import request from "@/utils/request";

export function getCategory(params) {
  return request({
    url: "/category/page",
    method: "get",
    params,
  });
}

export function deleteCategory(params) {
  return request({
    url: "/category",
    method: "DELETE",
    params,
  });
}

export function addCategory(data) {
  return request({
    url: "/category",
    method: "POST",
    data,
  });
}

export function editCategory(data) {
  return request({
    url: "/category",
    method: "PUT",
    data,
  });
}
